package com.initialize.gateway.config;

import com.initialize.core.security.config.SecurityRequestConfig;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: jane
 * Date: 2020/1/6
 * Time: 5:18 下午
 * Description: 自定义
 */
public class CustomizeSecurityRequestConfig extends SecurityRequestConfig {

    /**
     * 安全请求
     */
    public static List<String> securityRequestList = new ArrayList<>();

    /**
     * 权限请求
     */
    public static List<Competence> competenceRequestList = new ArrayList<>();

    static {
//        securityRequestList.add("/service-system/user/port");
//        securityRequestList.add("/auth/create-token");
//        securityRequestList.add("/" + ServiceConfig.SERVICE_AUTH + "/auth/**");
    }

    static {
//        competenceRequestList.add(new Competence("/security", "SECURITY"));
    }


    public CustomizeSecurityRequestConfig() {
        new SecurityRequestConfig().setSecurityRequestList(securityRequestList);
        new SecurityRequestConfig().setCompetenceRequestList(competenceRequestList);
    }
}